package com.hare.common.global.enums;


/**
 * @program: Hare
 * @description: http 状态码
 * @author: Hare
 * @create: 2022-06-23 12:02
 * @Version 6.0.1
 **/
public enum ResultCode {
    SUCCESS(00000, "处理成功"),
    ERROR(50000, "处理失败"),
    // 用户相关
    UNAUTHORIZED(40001, "认证失败"),
    FORBIDDEN(40003, "授权失败"),
    PASSWORD_ERROR(40004,"密码错误，请重新输入！"),
    USER_NOT_FOUNT(40005,"账号 %s 不存在，请重新输入"),
    USER_STOP_USING(40006,"账号 %s 已停用");


    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
